import request from '@/config/axios'


//获取所有权限
export const roleList = (params) => {
    return request.get({ url: '/role/index', params })
}


//新增权限
export const roleInsert = (data) => {
    return request.post({ url: '/role/add', data })
}


//修改权限
export const roleUpdate = (data) => {
    return request.post({ url: '/role/update', data })
}

//删除权限
export const roleDel = (params) => {
    return request.get({ url: '/role/del', params })
}


//添加角色绑定菜单权限
export const roleMenuTreeInsert = (data) => {
    return request.post({ url: '/role/add-rel', data })
}

//获取角色绑定菜单权限列表
export const findAllRoleIdChoose = (params) => {
    return request.get({ url: '/role/list', params })
}
